﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
using System.Xml;

namespace IntelligentDecisioning.SharePoint.Definition.Fields
{
    public class DateField: Field
    {

        public bool IsDateOnly { get; set; }

        public DateField()
        {
            base.Type = SPFieldType.DateTime.ToString();
        }

        protected override void AddCustomFieldAttributes(XmlWriter xmlWriter)
        {
            if (IsDateOnly)
            {
                xmlWriter.WriteAttributeString(DefinitionConstants.FORMAT_ATTRIBUTE, "DateOnly");
            }
            //xmlWriter.WriteAttributeString("StorageTZ", "UTC");
        }
    }
}
